<?php

namespace App\Http\Controllers\Game\Other\Activity;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Http\Requests\Game\Other\Activity\Sign\UpdateRequest;
use App\Http\Resources\Common\DataResource;
use App\Services\Game\Other\Activity\SignService as ActivityService;

class SignController extends Controller
{

    /**
     * 获取配置
     */
    public function getConfig(Request $request)
    {
        $platCode = $request->input('plat_code');

        $activity = ActivityService::make()->getConfig($platCode);

        return new DataResource($activity);
    }

    /**
     * 更新配置
     */
    public function update(UpdateRequest $request)
    {
        $platCode = $request->input('plat_code');

        $activity = ActivityService::make()->update($platCode, $request);

        return new DataResource($activity);
    }
}
